Skip to content

added semver class#497

Merged
chillaq merged 2 commits into
Feature/Semverfrom
semver-class
May 3, 2024
Merged

added semver class#497
chillaq merged 2 commits into
Feature/Semverfrom
semver-class

Conversation

@chillaq

@chillaq chillaq commented Apr 23, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@chillaq
chillaq requested a review from a team as a code owner April 23, 2024 20:11
Comment thread client/src/main/java/io/split/engine/matchers/Semver.java
@chillaq
chillaq requested a review from sanzmauro May 2, 2024 21:20
if ( Ints.tryParse(_preRelease[i]) != null && Ints.tryParse(toCompare._preRelease[i]) != null) {
return Integer.compare(Integer.parseInt(_preRelease[i]), Integer.parseInt(toCompare._preRelease[i]));
}
return AdjustNumber(_preRelease[i].compareTo(toCompare._preRelease[i]));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need the AdjustNumber?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compare function returns numbers higher than 1, so I need to adjust it to return -1, 0 or 1

@chillaq
chillaq requested a review from sanzmauro May 3, 2024 17:58
@chillaq
chillaq merged commit 0fde0eb into Feature/Semver May 3, 2024
@chillaq
chillaq deleted the semver-class branch May 3, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants